package com.zte.user.model;

import com.alibaba.fastjson.annotation.JSONField;

import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.Date;

@XmlRootElement(name = "user")
public class SmbmsUser {

  private String id;
  private String usercode;
  @Size(max = 8,min = 6)
  private String username;
  private String userpassword;
  private String gender;
  @Min(10)
  private Integer age;
  // @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @JSONField(format = "yyyy-MM-dd HH")
  private Date birthday;
  private String phone;
  private String address;
  private String userrole;
  private String createdby;
  private Date creationdate;
  private String modifyby;
  private Date modifydate;


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }


  public String getUsercode() {
    return usercode;
  }

  public void setUsercode(String usercode) {
    this.usercode = usercode;
  }


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }


  public String getUserpassword() {
    return userpassword;
  }

  public void setUserpassword(String userpassword) {
    this.userpassword = userpassword;
  }


  public String getGender() {
    return gender;
  }

  public void setGender(String gender) {
    this.gender = gender;
  }

  public Integer getAge() {
    return age;
  }

  public void setAge(Integer age) {
    this.age = age;
  }

  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }


  public String getPhone() {
    return phone;
  }

  public void setPhone(String phone) {
    this.phone = phone;
  }


  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }


  public String getUserrole() {
    return userrole;
  }

  public void setUserrole(String userrole) {
    this.userrole = userrole;
  }


  public String getCreatedby() {
    return createdby;
  }

  public void setCreatedby(String createdby) {
    this.createdby = createdby;
  }


  public Date getCreationdate() {
    return creationdate;
  }

  public void setCreationdate(Date creationdate) {
    this.creationdate = creationdate;
  }


  public String getModifyby() {
    return modifyby;
  }

  public void setModifyby(String modifyby) {
    this.modifyby = modifyby;
  }


  public Date getModifydate() {
    return modifydate;
  }

  public void setModifydate(Date modifydate) {
    this.modifydate = modifydate;
  }

  @Override
  public String toString() {
    return "SmbmsUser{" +
            "id='" + id + '\'' +
            ", usercode='" + usercode + '\'' +
            ", username='" + username + '\'' +
            ", userpassword='" + userpassword + '\'' +
            ", gender='" + gender + '\'' +
            ", age=" + age +
            ", birthday=" + birthday +
            ", phone='" + phone + '\'' +
            ", address='" + address + '\'' +
            ", userrole='" + userrole + '\'' +
            ", createdby='" + createdby + '\'' +
            ", creationdate=" + creationdate +
            ", modifyby='" + modifyby + '\'' +
            ", modifydate=" + modifydate +
            '}';
  }
}
